import axios from '../utils/http'


// 合作平台列表 列表
export const saveCooperationList = (params) =>
    axios({
        url: '/v1/manager/cooperation/platform',
        method: 'get',
        params
    })


// 合作平台列表 添加
export const saveCooperationListAdd = (data) =>
    axios({
        url: '/v1/manager/cooperation/platform',
        method: 'post',
        data
    })

// 合作平台列表 移动
export const saveCooperationListIdPut = (params) =>
    axios({
        url: `/v1/manager/cooperation/platform/sort`,
        method: 'put',
        params
    })

// 合作平台列表 删除
export const saveCooperationListDelete = (params) =>
    axios({
        url: `/v1/manager/cooperation/platform/${params}`,
        method: 'delete',
    })

//------------------------------------------------------------
// 商品分类列表 列表
export const saveCommodityClassifyList = (params) =>
    axios({
        url: '/v1/manager/classify/good',
        method: 'get',
        params
    })

// 商品分类列表 添加
export const saveCommodityClassifyListAdd = (data) =>
    axios({
        url: '/v1/manager/classify/good',
        method: 'post',
        data
    })

// 商品分类列表 删除
export const saveCommodityClassifyListDelete = (params) =>
    axios({
        url: `/v1/manager/classify/good/${params}`,
        method: 'delete',
    })

//-----------------------------
// 商品列表 列表
export const saveCommodityList = (params) =>
    axios({
        url: '/v1/manager/good',
        method: 'get',
        params
    })

// 商品列表 列表详情
export const saveCommodityListId = (params) =>
    axios({
        url: `/v1/manager/good/${params}`,
        method: 'get',
    })

// 商品列表 添加
export const saveCommodityListIdAdd = (data) =>
    axios({
        url: '/v1/manager/good',
        method: 'post',
        data
    })

// 商品列表 删除
export const saveCommodityListIdDelete = (params) =>
    axios({
        url: `/v1/manager/good/${params}`,
        method: 'delete',
    })

// 商品列表 上下架
export const saveCommodityListIdPut = (params) =>
    axios({
        url: `/v1/manager/good/${params}`,
        method: 'put',
    })

//------------------------------------------------------
// 商品属性 添加
export const saveCommodityListIdPropertyAdd = (data) =>
    axios({
        url: '/v1/manager/property/good',
        method: 'post',
        data
    })

// 商品属性 删除
export const saveCommodityListIdPropertyDelete = (params) =>
    axios({
        url: `/v1/manager/property/good/${params}`,
        method: 'delete',
    })

// 商品规格 添加
export const saveCommodityListIdStockAdd = (params) =>
    axios({
        url: `/v1/manager/stock/good`,
        method: 'post',
        params
    })

//------------------------------------------------
// 邮费管理 列表
export const savePostagegoodList = (params) =>
    axios({
        url: '/v1/manager/postage/good',
        method: 'get',
        params
    })

// 邮费管理 列表详情
export const savePostagegoodListId = (params) =>
    axios({
        url: `/v1/manager/postage/good/${params}`,
        method: 'get',
    })

// 邮费管理 添加
export const savePostagegoodListIdAdd = (data) =>
    axios({
        url: '/v1/manager/postage/good',
        method: 'post',
        data
    })


// 邮费管理 删除
export const savePostagegoodListIdDelete = (params) =>
    axios({
        url: `/v1/manager/postage/good/${params}`,
        method: 'delete',
    })
